var limsPurchase = Gikam.getPageObject({

    getEditListColumns: function () {
        return [{
            checkbox: true
        }, {index: true}, Gikam.status.getBpmnColumn(limsPurchase.workflow.dbTable), {
            field: 'applyCode',
            title: 'T_LIMS_PURCHASE.APPLYCODE',
            type: 'link',
            width: 140
        }, {
            field: 'applyOffice',
            title: 'T_LIMS_PURCHASE.APPLYOFFICE',
            width: 140
            // editor: true
        }, {
            field: 'type',
            title: 'T_LIMS_PURCHASE.TYPE',
            width: 140
            // editor: true
        }, {
            field: 'buyMode',
            title: 'T_LIMS_PURCHASE.BUYMODE',
            width: 140
            // editor: true
        }, {
            field: 'createdByName',
            title: 'T_LIMS_LOCATION_CHANGE.CREATEDBYNAME',
            width: 140
        }, {
            field: 'createdTime',
            type: 'dateTime',
            title: 'T_LIMS_LOCATION_CHANGE.CREATEDTIME',
            width: 160
        }];
    },

    getBaseInfoFormFields: function () {
        return [{
            field: 'applyOffice',
            title: 'T_LIMS_PURCHASE.APPLYOFFICE',
            preInsert: true,
            editor: true
        }, {
            field: 'type',
            title: 'T_LIMS_PURCHASE.TYPE',
            preInsert: true,
            editor: true
        }, {
            field: 'buyMode',
            title: 'T_LIMS_PURCHASE.BUYMODE',
            preInsert: true,
            editor: true
        },];
    },

    getShowListColumns: function () {
        return [{
            checkbox: true
        }, {index: true}, Gikam.status.getBpmnColumn(limsPurchase.workflow.dbTable), {
            field: 'applyCode',
            title: 'T_LIMS_PURCHASE.APPLYCODE',
            type: 'link',
            width: 140
        }, {
            field: 'applyOffice',
            title: 'T_LIMS_PURCHASE.APPLYOFFICE',
            width: 140
        }, {
            field: 'type',
            title: 'T_LIMS_PURCHASE.TYPE',
            width: 140
        }, {
            field: 'buyMode',
            title: 'T_LIMS_PURCHASE.BUYMODE',
            width: 140
        }, {
            field: 'createdByName',
            title: 'T_LIMS_LOCATION_CHANGE.CREATEDBYNAME',
            width: 140
        }, {
            field: 'createdTime',
            type: 'dateTime',
            title: 'T_LIMS_LOCATION_CHANGE.CREATEDTIME',
            width: 160
        }];
    },

    getMaterialListColumns: function () {
        return [{
            checkbox: true
        }, {index: true}, {
            field: 'code',
            title: 'T_LIMS_PURCHASE_MATERIAL.CODE',
            editor: true
        }, {
            field: 'name',
            title: 'T_LIMS_PURCHASE_MATERIAL.NAME',
            editor: true
        }, {
            field: 'factory',
            title: 'T_LIMS_PURCHASE_MATERIAL.FACTORY',
            editor: true
        }, {
            field: 'model',
            title: 'T_LIMS_PURCHASE_MATERIAL.MODEL',
            editor: true
        }, {
            field: 'num',
            title: 'T_LIMS_PURCHASE_MATERIAL.NUM',
            editor: true
        }, {
            field: 'unit',
            title: 'T_LIMS_PURCHASE_MATERIAL.UNIT',
            editor: true
        }, {
            field: 'skillAsk',
            title: 'T_LIMS_PURCHASE_MATERIAL.SKILLASK',
            editor: true
        }, {
            field: 'unitPrice',
            title: 'T_LIMS_PURCHASE_MATERIAL.UNITPRICE',
            editor: true
        }, {
            field: 'totalPrice',
            title: 'T_LIMS_PURCHASE_MATERIAL.TOTALPRICE',
            editor: true
        }, {
            field: 'reason',
            title: 'T_LIMS_PURCHASE_MATERIAL.REASON',
            editor: true
        }, {
            field: 'remark',
            title: 'T_LIMS_PURCHASE_MATERIAL.REMARK',
            editor: true
        }];
    },

    getMaterialShowListColumns: function () {
        return [{
            checkbox: true
        }, {index: true}, {
            field: 'code',
            title: 'T_LIMS_PURCHASE_MATERIAL.CODE',
        }, {
            field: 'name',
            title: 'T_LIMS_PURCHASE_MATERIAL.NAME',
        }, {
            field: 'factory',
            title: 'T_LIMS_PURCHASE_MATERIAL.FACTORY',
        }, {
            field: 'model',
            title: 'T_LIMS_PURCHASE_MATERIAL.MODEL',
        }, {
            field: 'num',
            title: 'T_LIMS_PURCHASE_MATERIAL.NUM',
        }, {
            field: 'unit',
            title: 'T_LIMS_PURCHASE_MATERIAL.UNIT',
        }, {
            field: 'skillAsk',
            title: 'T_LIMS_PURCHASE_MATERIAL.SKILLASK',
        }, {
            field: 'unitPrice',
            title: 'T_LIMS_PURCHASE_MATERIAL.UNITPRICE',
        }, {
            field: 'totalPrice',
            title: 'T_LIMS_PURCHASE_MATERIAL.TOTALPRICE',
        }, {
            field: 'reason',
            title: 'T_LIMS_PURCHASE_MATERIAL.REASON',
        }, {
            field: 'remark',
            title: 'T_LIMS_PURCHASE_MATERIAL.REMARK',
        }];
    },

    getMaterialBaseInfoForm: function () {
        return [{
            field: 'code',
            title: 'T_LIMS_PURCHASE_MATERIAL.CODE',
            preInsert: true,
        }, {
            field: 'name',
            title: 'T_LIMS_PURCHASE_MATERIAL.NAME',
            preInsert: true,
        }, {
            field: 'factory',
            title: 'T_LIMS_PURCHASE_MATERIAL.FACTORY',
            preInsert: true,
        }, {
            field: 'model',
            title: 'T_LIMS_PURCHASE_MATERIAL.MODEL',
            preInsert: true,
        }, {
            field: 'num',
            title: 'T_LIMS_PURCHASE_MATERIAL.NUM',
            preInsert: true,
        }, {
            field: 'unit',
            title: 'T_LIMS_PURCHASE_MATERIAL.UNIT',
            preInsert: true,
        }, {
            field: 'skillAsk',
            title: 'T_LIMS_PURCHASE_MATERIAL.SKILLASK',
            preInsert: true,
        }, {
            field: 'unitPrice',
            title: 'T_LIMS_PURCHASE_MATERIAL.UNITPRICE',
            preInsert: true,
        }, {
            field: 'totalPrice',
            title: 'T_LIMS_PURCHASE_MATERIAL.TOTALPRICE',
            preInsert: true,
        }, {
            field: 'reason',
            title: 'T_LIMS_PURCHASE_MATERIAL.REASON',
            preInsert: true,
        }, {
            field: 'remark',
            title: 'T_LIMS_PURCHASE_MATERIAL.REMARK',
            preInsert: true,
        }];
    },

    baseUrl: IFM_CONTEXT + '/secure/basemodule/basedata/purchases',
    workflow: {
        dbTable: 'T_LIMS_PURCHASE',
        columns: [{
            field: 'id',
            title: 'T_LIMS_PURCHASE.ID'
        }]
    },

    /**
     * 审核记录
     */
    getFlowListColumns: function () {
        return [{
            index: true
        }, {
            title: 'CORE.MODULE.SYS.T_CORE_BPMN_DIAGRAM.CANDIDATOR.TASKNAME',
            field: 'taskName',
        }, {
            title: 'CORE.MODULE.SYS.T_CORE_BPMN_DIAGRAM.CANDIDATOR.USER',
            field: 'auditedByName'
        }, {
            title: 'T_CORE_INTERNAL_AUDIT.AUDITDATE',
            field: 'auditedTime',
            width: 140
        }, {
            title: 'GIKAM.WORKFLOW.PASS.OPINION.TITLE',
            field: 'comment',
            width: 300
        }, {
            title: 'CORE.MODULE.SYS.T_CORE_BPMN_DIAGRAM.COMMENT.ROUTE',
            field: 'route',
            width: 140
        }]
    },
});
